<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + " ://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML>
<jsp:include page="root_public.jsp"/>
<title>添加角色 - 角色管理</title>
<style>

    .layui-form-item .layui-input-inline {
        height: 37.55555px;
        line-height: 37.5555px
    }
</style>
</head>

<body>
<div class="x-body">
    <form class="layui-form">
        <div class="layui-form-item">
            <label class="layui-form-label">
                发布人：
            </label>
            <div class="layui-input-inline realName">
            </div>
        </div>
        <div class="layui-form-item linkman">
            <label class="layui-form-label">
                联系人：
            </label>
            <div class="layui-input-inline">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                电话：
            </label>
            <div class="layui-input-inline linkphone">
            </div>
        </div>
        <div class="layui-form-item linkshort">
            <label class="layui-form-label">
                短号：
            </label>
            <div class="layui-input-inline ">
            </div>
        </div>
        <div class="layui-form-item qq">
            <label class="layui-form-label">
                qq：
            </label>
            <div class="layui-input-inline ">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                时间：
            </label>
            <div class="layui-input-inline createdate">
            </div>
        </div>
    </form>
</div>
<script>
    layui.use(['form', 'layer'], function () {

        var str = location.search;
        str = str.substring(str.indexOf("=") + 1);

        /*
        * 获取详情
        * */
        $.ajax({
            type: "post",
            url: "<%=path%>/msg/findDetail",
            async: true,
            dataType: "json",
            data: {
                "id": str
            },
            success: function (data) {
                var data = data.data.message;
                if (data.linkman != null && data.linkman !== "") {
                    $('.linkman div').text(data.linkman);
                } else {
                    $('.linkman div').text("匿名");
                }
                if (data.qq != null && data.qq !== "") {
                    $('.qq div').text(data.qq);
                } else {
                    $('.qq div').text("无");
                }
                if (data.linkshort != null && data.linkshort !== "") {
                    $('.linkshort div').text(data.linkshort);
                } else {
                    $('.linkshort div').text("无");
                }

                $('.realName').text(data.realName);
                $('.createdate').text(data.createdate);
                $('.linkphone').text(data.linkphone);
            }
        });
    });
</script>

</body>

</html>